Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid revealing hidden tiles when selecting automove destination on CURSES #40194

Merged
merged 2 commits into from
May 6, 2020
Merged

Avoid revealing hidden tiles when selecting automove destination on CURSES #40194

merged 2 commits into from
May 6, 2020

Conversation

olanti-p
Copy link
Contributor

@olanti-p olanti-p commented May 5, 2020

Summary

SUMMARY: Bugfixes "Fix selecting automove destination would reveal hidden tiles on CURSES"

Purpose of change

To draw a line, CURSES version draws all tiles the line passes through but with inverted colors. The function that determines symbol and color and prints it is also responsible for committing said symbol to memory. The automove's path can pass through unrevealed tiles, causing the drawing function to scan these unrevealed tiles and commit them to memory.

Describe the solution

Filter line points by visibility and use a separate method for selecting symbol & color of hidden points.

Describe alternatives you've considered

Making the new visibility check always enabled. Don't know how that would affect performance for other cases though.

Testing

It compiles and looks as expected

Additional context

Before
old

After
new

@mlangsdorf mlangsdorf added <Exploit> Unintended interactions or behavior, usually breaking how the game is balanced Info / User Interface Game - player communication, menus, etc. labels May 5, 2020
@ifreund ifreund added the <Bugfix> This is a fix for a bug (or closes open issue) label May 5, 2020
@ZhilkinSerg ZhilkinSerg merged commit 3d706f3 into CleverRaven:master May 6, 2020
@olanti-p olanti-p deleted the no-tile-reveal branch May 6, 2020 22:16
tung pushed a commit to tung/Cataclysm-DDA that referenced this pull request Jul 27, 2020
Coolthulhu referenced this pull request in cataclysmbnteam/Cataclysm-BN Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) <Exploit> Unintended interactions or behavior, usually breaking how the game is balanced Info / User Interface Game - player communication, menus, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants